<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:73:"D:\wamp\www\shop\public/../application/madmin\view\WechatKey\showAdd.html";i:1548235159;s:71:"D:\wamp\www\shop\public/../application/madmin\view\Public\showBase.html";i:1547543098;}*/ ?>
<!DOCTYPE HTML>
<html>
	<head>
		<title>后台管理</title>
	    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	    <meta charset="UTF-8" />
	    <link rel="icon" type="image/ico" href="__IMG__/favicon.ico" />
	    <link type="text/css" rel="stylesheet" href="__CSS__/vendor/bootstrap/bootstrap.min.css" />
	    <link type="text/css" rel="stylesheet" href="__CSS__/content.css" />
		<link type="text/css" rel="stylesheet" href="__CSS__/vendor/font-awesome.css" />
		<link type="text/css" rel="stylesheet" href="__CSS__/vendor/bootstrap-checkbox.css" />
		<link type="text/css" rel="stylesheet" href="__JS__/vendor/chosen/css/chosen.min.css" />
		<link type="text/css" rel="stylesheet" href="__JS__/vendor/chosen/css/chosen-bootstrap.css" />
		<link type="text/css" rel="stylesheet" href="__CSS__/nicescroll.css" />
        <link type="text/css" rel="stylesheet" href="__CSS__/adapt.css" />
        <link type="text/css" rel="stylesheet" href="__CSS__/pagination.css" />
        <link type="text/css" rel="stylesheet" href="__CSS__/buttons.css" />
		<script type="text/javascript" src="__JS__/jquery-3.3.1.min.js"></script>
		<script type="text/javascript" src="__JS__/vendor/layer/layer.js"></script>
		<script type="text/javascript" src="__JS__/vendor/bootstrap/bootstrap.min.js"></script>
		<script type="text/javascript" src="__JS__/vendor/nicescroll/jquery.nicescroll.min.js"></script>
		<script type="text/javascript" src="__JS__/vendor/chosen/chosen.jquery.min.js"></script>
		<script type="text/javascript" src="__JS__/content.js"></script>
	</head>
	<body class="no-bg">
		<div id="wrap">
	        <div class="row">
	            <div id="content" class="col-md-12">
	            	
<div class="main">
    <div class="row">
        <div class="col-md-12">
            <section class="tile color transparent-black">
                <div class="tile-header bg-transparent-black-2">
                    <h1>
                        <?php if($Info == ''): ?>
                            <?php echo lang('WxTwXz'); else: ?>
                            <?php echo lang('WxTwGx'); endif; ?>
                    </h1>
                    <div class="controls">
                        <a href="javascript:void(0);" onclick="window.history.back();"><i class="fa fa-arrow-left"></i></a>
                        <?php if($Info == ''): ?>
                            <a href="<?php echo url('WechatKey/showAdd'); ?>"><i class="fa fa-refresh"></i></a>
                        <?php else: ?>
                            <a href="<?php echo url('WechatKey/showEdit', array('id'=>$Info['key_id'])); ?>"><i class="fa fa-refresh"></i></a>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="tile-body nopadding">
                    <form class="FormTable" action="" method="post">
                        <div class="tile-body">
                            <div class="row">
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('WxTwGjz'); ?></label>
                                    <input type="text" class="form-control" name="key_name" value="<?php echo $Info['key_name']; ?>" placeholder="<?php echo lang('WxTwGjzWk'); ?>" />
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('WxTwLx'); ?></label>
                                    <select class="chosen-select chosen-transparent form-control" name="key_type" id="key_type">
                                        <option value="1" <?php if($Info['key_type'] == '1'): ?>selected<?php endif; ?>><?php echo lang('WxTwLx1'); ?></option>
                                        <option value="2" <?php if($Info['key_type'] == '2'): ?>selected<?php endif; ?>><?php echo lang('WxTwLx2'); ?></option>
                                    </select>
                                </div>
                                <div class="form-group col-sm-12 key_text">
                                    <label><?php echo lang('WxTwNr'); ?></label>
                                    <input type="text" class="form-control" name="key_text" value="<?php echo $Info['key_text']; ?>" placeholder="<?php echo lang('WxTwNrWk'); ?>" />
                                </div>
                                <div class="form-group col-sm-12 key_news" style="display: none">
                                    <label><?php echo lang('WxTwBt'); ?></label>
                                    <input type="text" class="form-control" name="key_title" value="<?php echo $Info['key_title']; ?>" placeholder="<?php echo lang('WxTwBtWk'); ?>" />
                                </div>
                                <div class="form-group col-sm-12 key_news" style="display: none">
                                    <label><?php echo lang('WxTwJj'); ?></label>
                                    <input type="text" class="form-control" name="key_info" value="<?php echo $Info['key_info']; ?>" placeholder="<?php echo lang('WxTwJjWk'); ?>" />
                                </div>
                                <div class="form-group col-sm-12 key_news" style="display: none">
                                    <label><?php echo lang('WxTwTp'); ?></label>
                                    <input type="text" class="form-control" name="key_img" value="<?php echo $Info['key_img']; ?>" placeholder="<?php echo lang('WxTwTpWk'); ?>" />
                                </div>
                                <div class="form-group col-sm-12 key_news" style="display: none">
                                    <label><?php echo lang('WxTwWz'); ?></label>
                                    <input type="text" class="form-control" name="key_url" value="<?php echo $Info['key_url']; ?>" placeholder="<?php echo lang('WxTwWzWk'); ?>" />
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('WxTwZt'); ?></label>
                                    <select class="chosen-select chosen-transparent form-control" name="key_state">
                                        <option value="1" <?php if($Info['key_state'] == '1'): ?>selected<?php endif; ?>><?php echo lang('WxTwZt1'); ?></option>
                                        <option value="2" <?php if($Info['key_state'] == '2'): ?>selected<?php endif; ?>><?php echo lang('WxTwZt2'); ?></option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="tile-footer bg-transparent-black-2 rounded-bottom-corners">
                    <div class="row">
                        <div class="col-sm-12 text-center">
                            <button type="button" class="btn btn-<?php echo config('CNF_BTNCOLOR'); ?> ajax-post"><?php echo lang('Form_Submit'); ?></button>
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </div>
</div>

	        	</div>
	        </div>
	    </div>
		
    <script>
        $(function(){
            <?php if($Info['key_type'] == 1): ?>
                $('.key_text').show();
                $('.key_news').hide();
            <?php elseif($Info['key_type'] == 2): ?>
                $('.key_news').show();
                $('.key_text').hide();
            <?php endif; ?>

            $('#key_type').change(function(){
                //$('.key_text,.key_news').hide('');
                var key_type = $('#key_type').val();
                if(key_type == 1){
                    $('.key_text').show();
                    $('.key_news').hide();
                }else if(key_type == 2){
                    $('.key_news').show();
                    $('.key_text').hide();
                }
            });
        })
    </script>

	</body>
</html>